import _fetch from './request'

// 定义api方法
function getCodeApi(data){
  return _fetch({
    url: "/sendsms",
    method: "post",
    data: data,
    // withCredentials:true //跨域带cookie到后端
  })
}

// 注册
function Register (data){
  return _fetch({
    url:'/register',
    method:'post',
    data
  })
}

export {Register,getCodeApi}